@import "../../../../styles/themes/variable";
@import "../../../../styles/mixins/clearfix";

@mixin placeholder($color: $input-placeholder-color) {
  // Firefox
  &::-moz-placeholder {
    color: $color;
    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
  }
  // Internet Explorer 10+
  &:-ms-input-placeholder {
    color: $color;
  }
  // Safari and Chrome
  &::-webkit-input-placeholder {
    color: $color;
  }
}


// input status
// == when focus or actived
@mixin active($color: $outline-color) {
  border-color: darken($color, 5%);
  outline: 0;
  box-shadow: 0 0 $outline-blur-size $outline-width rgba($color, 0.2);
}

// == when hoverd
@mixin hover($color: $input-hover-border-color) {
  border-color: darken($color, 5%);
}

@mixin disabled() {
  background-color: $input-disabled-bg;
  opacity: 1;
  cursor: not-allowed;
  color: $input-disabled-color;
  border-color: $input-border-color;
  &:hover {
    @include hover($input-border-color);
  }
}


@mixin input() {
  position: relative;
  display: inline-block;
  width: 100%;
  height: $input-height-base;
  padding: $input-padding-vertical-base $input-padding-horizontal-base;
  color: $input-color;
  font-size: $font-size-base;
  line-height: $input-height-base;
  background-color: $input-bg;
  background-image: none;
  border: $border-width-base $border-style-base $input-border-color;
  border-radius: $border-radius-base;
  transition: all 0.3s;
  @include placeholder(); // Reset placeholder

  &:hover {
    @include hover();
  }

  &:focus {
    @include active();
  }
  &-disabled {
    @include disabled();
  }
  &[disable] {
    @include disabled();
  }
}


.autoparts-search {
  width: 100%;
  height: 100%;
  overflow: hidden;

  /deep/ .apes-card-body {
    padding: 6px;
  }

  .epc-title-wrapper {
    display: flex;

    .query-wrapper {
      min-width: 640px;
      margin-bottom: 0px !important;;

      .query-control-button {
        margin-bottom: 4px;
      }

      .query-input {
        input {
          width: 33%;
        }
      }
    }

    .model-info-wrapper {
      margin-bottom: 0px !important;;

      /deep/ .apes-descriptions-row > td {
        padding-bottom: 8px;
      }
    }
  }

  .epc-control {
    line-height: 40px;
    @include clearfix;
  }

  .epc-wrapper {
    position: relative;
    display: flex;
    height: calc(100% - 138px);
    background-color: #f3f3f3;

    .epc-menu {
      flex: 0 0 120px;
      min-width: 200px;
      overflow: auto;
      transition: 0.3ms all ease;
      height: 100%;
    }

    .epc-content {
      display: flex;
      flex: 1 1 auto;
      overflow-y: auto;
      height: 100%;

      /deep/ .apes-card-body {
        width: 100%;
        display: flex;
      }

      epc-level-list {
        flex: 1 1 auto;
      }

      .epc-image-content {
        flex: 1 1 auto;
        overflow: hidden;
        margin: 0 !important;
        /deep/ .apes-card-body {
          width: 100%;
          height: 100%;
          display: block;
        }
      }

      .epc-parts-list {
        flex: 0 0 60%;
        background-color: #fff;
        margin: 0 !important;
        /deep/ .apes-card-body {
          width: 100%;
          height: 100%;
          display: block;
        }
      }
    }

    .epc-load-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #fff;
      border-top: 1px solid #e8e8e8;

      .epc-container {
        display: flex;
        justify-content: space-around;
        width: 75px;
        height: 60px;
        text-align: center;
        font-size: 10px;

        .epc-boxLoading {
          background-color: #87ceeb;
          height: 100%;
          width: 8px;
          display: inline-block;

          -webkit-animation: stretchdelay 1.2s infinite ease-in-out;
          animation: stretchdelay 1.2s infinite ease-in-out;
        }

        .epc-boxLoading2 {
          -webkit-animation-delay: -1.1s;
          animation-delay: -1.1s;
        }

        .epc-boxLoading3 {
          -webkit-animation-delay: -1.0s;
          animation-delay: -1.0s;
        }

        .epc-boxLoading4 {
          -webkit-animation-delay: -0.9s;
          animation-delay: -0.9s;
        }

        .epc-boxLoading5 {
          -webkit-animation-delay: -0.8s;
          animation-delay: -0.8s;
        }
      }
    }

  }


  @-webkit-keyframes stretchdelay {
    0%, 40%, 100% {
      -webkit-transform: scaleY(0.4)
    }
    20% {
      -webkit-transform: scaleY(1.0)
    }
  }
  @keyframes stretchdelay {
    0%, 40%, 100% {
      transform: scaleY(0.4);
      -webkit-transform: scaleY(0.4);
    }
    20% {
      transform: scaleY(1.0);
      -webkit-transform: scaleY(1.0);
    }
  }


  /deep/ button[disabled],
  /deep/ button[disabled].active,
  /deep/ button[disabled]:active,
  /deep/ button[disabled]:focus,
  /deep/ button[disabled]:hover {
    color: rgba(0, 0, 0, .25);
    background-color: #f5f5f5;
    border-color: #d9d9d9;
    text-shadow: none;
    box-shadow: none;
  }

  input {
    @include input();
  }

  &::-webkit-scrollbar {
    width: 3px;
    height: 1px
  }

  &::-webkit-scrollbar-track-piece {
    background-color: rgb(241, 241, 241);
    -webkit-border-radius: 2px
  }

  &::-webkit-scrollbar-thumb:vertical {
    height: 5px;
    background-color: rgb(169, 169, 169);
    -webkit-border-radius: 2px
  }

  &::-webkit-scrollbar-thumb:horizontal {
    width: 5px;
    background-color: rgb(169, 169, 169);
    -webkit-border-radius: 2px
  }

}
